package com.xwy.usercenter.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xwy.usercenter.common.BaseResponse;
import com.xwy.usercenter.model.Team;
import com.xwy.usercenter.model.User;
import com.xwy.usercenter.model.dto.TeamQuery;
import com.xwy.usercenter.model.request.TeamAddRequest;
import com.xwy.usercenter.model.request.TeamJoinRequest;
import com.xwy.usercenter.model.request.TeamQuitRequest;
import com.xwy.usercenter.model.request.TeamUpdateRequest;
import com.xwy.usercenter.model.vo.TeamUserVO;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


/**
 *
 */
@Service
public interface TeamService extends IService<Team> {

    /**
     * 创建队伍
     * @param team
     * @param loginUser
     * @return
     */
    Long addTeam(Team team, User loginUser);

    /**
     * 列表展示队伍
     * @param teamQuery
     * @param isAdmin
     * @return
     */
    List<TeamUserVO> listTeam(TeamQuery teamQuery, Boolean isAdmin);

    /**
     *
     * @param teamUpdateRequest
     * @param loginUser
     */
    Boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    /**
     * 用户加入队伍
     * @param teamJoinRequest
     * @param loginUser
     * @return
     */
    Boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    /**
     * 用户退出队伍
     * @param teamQuitRequest
     * @param loginUser
     * @return
     */
    Boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    /**
     * 队长移除队伍
     * @param teamId
     * @param loginUser
     * @return
     */
    boolean removeTeam(Long teamId, User loginUser);
}
